package com.xyrl.project.common.constant;

/**
 * XYRL常量
 */
public class XyrlConstant {

    // user缓存前缀
    public static final String USER_CACHE_PREFIX = "xyrl:cache:user:";
    //customer缓存前缀
    public static final String CUSTOMER_USER_CACHE_PREFIX = "xyrl:cache:customer:user:";
    // user角色缓存前缀
    public static final String USER_ROLE_CACHE_PREFIX = "xyrl:cache:user:role:";
    // user权限缓存前缀
    public static final String USER_PERMISSION_CACHE_PREFIX = "xyrl:cache:user:permission:";
    // user个性化配置前缀
    public static final String USER_CONFIG_CACHE_PREFIX = "xyrl:cache:user:config:";
    // token缓存前缀
    public static final String TOKEN_CACHE_PREFIX = "xyrl:cache:token:";
    // 存储在线用户的 登录id
    public static final String ACTIVE_USERS_ZSET_PREFIX = "xyrl:user:active";
    /**
     * 存储在线用户详情
     */
    public static final String ACTIVE_USER_MAP_PREFIX = "xyrl:user:active:map";
    /**
     * 在线用户token 值
     */
    public static final String ACTIVE_USER_TOKEN = "xyrl:user:avtive:token";

    //数据字典缓存值
    public static final String DICTIONARY_PREFIX = "xyrl:dictionary:keys";
    // 排序规则: descend 降序
    public static final String ORDER_DESC = "descend";
    // 排序规则: ascend 升序
    public static final String ORDER_ASC = "ascend";

    // 按钮
    public static final String TYPE_BUTTON = "1";
    // 菜单
    public static final String TYPE_MENU = "0";
    /**
     * 用户类型 后台系统用户 关联表 t_user
     */
    public static final String USER_TYPE_SYSTEM = "system";
    /**
     * 用户类型 后台客户经理 关联表 t_user
     */
    public static final String USER_TYPE_SALESMAN = "salesman";
    /**
     * 用户类型 客户供货商 关联表 t_customer
     */
    public static final String USER_TYPE_SELLER_CUSTOMER = "seller";
    /**
     * 用户类型 客户进货商 关联表 t_customer
     */
    public static final String USER_TYPE_BUYER_CUSTOMER = "buyer";
    /**
     * 用户类型 客户(既是供货商又是进货商) 关联表 t_customer
     */
    public static final String USER_TYPE_CUSTOMER = "all";
    /**
     * 用户类型 客户(未确认类型) 关联表 t_customer
     */
    public static final String USER_TYPE_EMPTY = "empty";


    public static final String YES = "YES";
    public static final String NO = "NO";

    /**
     * 添加用户分布式锁key
     */
    public static final String LOCK_CREATE_USER_SIGN_KEY = "xyrl:create:user:sign";
    /**
     * 创建客户单线程锁
     */
    public static final String LOCK_CREATE_CUSTOMER_USER_SIGN_KEY = "xyrl:create:customer:user:sign:";
    /**
     * 码证码 缓存key  key-value 形式
     */
    public static final String ALIYUN_SMS_VALID_TERM = "xyrl:aliyun:sms:valid:term:";

    /**
     * 验证码发送间隔（针对设备 不针对手机号） key-value 形式
     */
    public static final String ALIYUN_SMS_INTERVAL_TERM = "xyrl:aliyun:sms:interval:term:";
    /**
     * 发送类型 短信
     */
    public static final String SEND_CODE_TYPE_SMS="sms";
    /**
     * 发送类型 语音
     */
    public static final String SEND_CODE_TYPE_SINGLE="single";
    /**
     * 交易密码找回缓存key
     */
    public static final String FIND_TRADE_PWD_CACHE_KEY="xyrl:find:trade:pwd:";

    /**
     * 阿里短信模版  用户注册
     */
    public static final String SMS_REGISTER_TEMPLATE_ID="SMS_181765142";
    /**
     * 阿里短信模版  用户登录
     */
    public static final String SMS_LOGIN_TEMPLATE_ID="SMS_181861330";
    /**
     * 附件状态 创建
     */
    public static final int ATTACHMENT_STATUS_CREATE=0;
    /**
     * 附件状态 己使用
     */
    public static final int ATTACHMENT_STATUS_USE=1;
    /**
     * 附件状态 己删除
     */
    public static final int ATTACHMENT_STATUS_DEL=2;

}
